package yunhe.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import yunhe.biz.ReceiptBiz;
import yunhe.entity.SaleAppend;
@WebServlet(name="searchRecServlet",urlPatterns="/searchRecServlet")
public class searchRecServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
	
		String saleId = request.getParameter("SALEID");
		ReceiptBiz receiptbiz = new ReceiptBiz();
		List<SaleAppend> SAppend =receiptbiz.checkSaleAppendById(saleId);
		HttpSession session = request.getSession();
		
		if(SAppend!=null){
			session.setAttribute("SAppend", SAppend);
		}
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doGet(req, resp);
	}
}
